package com.bt.lms.utils;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * 驱动类，
 */
public class DriverUtils {

    public static Connection Driver() {
        Connection connection;
        try {
            //加载驱动
            Class.forName("com.mysql.cj.jdbc.Driver");
            String url = "jdbc:mysql://rm-cn-zxu39exkm001edxo.rwlb.rds.aliyuncs.com:3306/bot_lms?useSSL=false";
            String userName = "root";
            String pwd = "Bot-417-1";
            //获取连接
            connection = DriverManager.getConnection(url, userName, pwd);


        } catch (Exception e) {
            throw new RuntimeException(e);
        }


        return connection;
    }


}
